#ifndef _SLAB_H
#define _SLAB_H

#include "type.h"
#include "list.h"

typedef struct {
	struct List list;
	// Page*       page;

	u64         using_count;
	u64         free_count;

	void*       Vaddress;

	u64         color_size;
	u64         color_count;

	u64*        color_map;
} Slab;

typedef struct {
	u64 size;
	u64 total_using;
	u64 total_free;
	Slab * _slab;
} SlabCache;

void slab_init();
void* __kmalloc(u64 size);
void __kfree(void* addr);

// extern kmalloc_cache_size[6];

#endif

